Case Expression in 'IN' clause
17:07 04 Nov 2014

I am trying to write a case expression inside the IN clause.

The Channel column contains three values ACT, REN, REP. I want to select more than 1 values, but I get result with only one value.

select *
from tbl
where tbl.Channel in (
    select 
        case when @ACT = 1 then 'ACT'
        when @REN = 1 then 'REN' 
        when @REP = 1 then 'REP' end
)

What changes should I be doing here?

sql