Here's an example...
DECLARE @LocID
SELECT @LocID = LocationID FROM Locations WHERE LocationName = 'WAREHOUSE X'