The correct syntax is more like:
select v.*,
(case when v.id = n.ch1 then 'CH1'
when v.id = n.ch2 then 'CH2'
when v.id = n.ch3 then 'CH3'
end) as WhichColumn
from variables v join
names n
on v.ID in (n.Ch1, n.ch2, n.ch3)
In other words, you have to explicitly put in the logic for the column names.