select t1.col1,t2.number from @sample t1 cross join ( select number from master..spt_values where Type = 'p' AND Number > 0 ) t2 where ','+cast(t1.col3 as varchar(2000))+',' like '%,'+cast(t2.number as varchar(10))+',%'