Retrieve data in Google Sheets based on Device ID

I’ve got everything sorted in Google Sheets, but I want to fetch the “End” value from the same row as the example “12345” value in the “DeviceID” column. So far, I’ve managed to fetch all the data from the “End” column, but I want to fetch the “End” value that is in the same row as “12345”.