I would like to use something like an .Include function in SQL Server 2008, but I could not find the correct syntax for it. I have a sql query like below:

```
--@values has to be varchar list and start & end with comma
declare @values varchar(max) = ',7,34,37,74,85,'
select (case when @values like '%,' + m.Id + ',%' then m.Name else null end)
from #myTable m

```

So the logic is, if ID of a record matches with one of the numbers in @values list, I would like to see its name in the output list. This query is working fine, but I would like to find a more professional way to handle it, maybe like:

```
case when @values.Include(m.Id) then m.Name else null end

```

Any advice would be appreciated. Thanks.