Perhaps something like this?
create table #t(IDList varchar(100))
insert into #t select '12,456,78'
union all select '789,56,321'
union all select '23,45,78'
declare @SID varchar(10) = '78';
select * from #t
where ',' + IDList + ',' like '%,' + @SID + ',%'
drop table #t
↧