I often have this requirement, and SOMETIME, if you know very well the column you are searching on [the size/format/length], you can do a kind of REGEX.
Something like this :
DECLARE @MyListOfLocation varchar(255)
set @MyListOfLocation = '|1|32|36|24|3|'
Select LocationID
from Table
where @MyListOfLocation like '%|' + LocationID + '|%'
NOTE : the PIPE character is used to protect the query from returning any LocationID that contains a single character (the '1', for example).
Here is a complete working example :
DECLARE @MyListOfLocation varchar(255)
set @MyListOfLocation = '|1|11|21|'
SELECT LocationName
FROM (
select '1' as LocationID, 'My Location 1' as LocationName
union all
select '11' as LocationID, 'My Location 11' as LocationName
union all
select '12' as LocationID, 'My Location 12' as LocationName
union all
select '13' as LocationID, 'My Location 13' as LocationName
union all
select '21' as LocationID, 'My Location 21' as LocationName
) as MySub
where @MyListOfLocation like '%|' + LocationID + '|%'
WARNING! This method is not Index friendly!
If you want do add some IN(@MyListOfLocation) in all that, to leverage use of INDEXES, you can modify your script do to :
SELECT MyDATA.*
FROM HugeTableWithAnIndexOnLocationID as MyDATA
WHERE LocationID in (
Select LocationID
from Table
where @MyListOfLocation like '%|' + LocationID + '|%')