select * from table A inner join table B on A.column= case when B.column ='this' then B.Column1 else B.column2 end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)