select *, case when cast(data as nvarchar(max)) like '%mergedranges%' then 'true' else 'false' end merged from Grids GG
Join ROUsages RU ON RU.ContentID =GG.ContentID
where cast(data as nvarchar(max)) like '%:' + cast(rousageid as varchar(10)) + '%:'  + cast(rousageid as varchar(10)) + '%'