• DECLARE @SomeVariable varchar(10)

    SET @SomeVariable = '1,2,5'

    SELECT * FROM TableA WHERE CHARINDEX(CAST(ColumnB as varchar),','+@SomeVariable+',') > 0

    Far away is close at hand in the images of elsewhere.
    Anon.