What are alternatives to implement the following query:
select * from table where isExternal = @type = 2 ? 1 : 0