What are alternatives to implement the following query:
select * from table where isExternal = @type = 2 ? 1 : 0
Use case:
case
select * from table where isExternal = case @type when 2 then 1 else 0 end