Try:
SELECT shift_ID
FROM time_shift
WHERE
DATEDIFF(hour, shift_From, shift_To) = 2
Learn more about DATEDIFF on MSDN
The first argument is the temporary part that you specify DATETIFF (hour, minute, second).
If your input matches exactly 02:00:00, you need to parse it to determine what is specified as the first argument.
, , :
SELECT shift_ID
FROM time_shift
WHERE
CAST(shift_From AS TIME) < CAST(@input AS TIME)
AND
CAST(@input AS TIME) < CAST(shift_To AS TIME)
CAST(@input AS TIME) BETWEEN (CAST(shift_From AS TIME), CAST(shift_To AS TIME))
MSDN