I want to check if a boolean is true, then decide in the WHERE clause what condition to use.
Say the boolean variable is @checkbool:
SELECT * FROM Ta
You can use IN clausule or even the != operator, like:
A.Id NOT IN (123,x,y,z);
or
A.Id != 123;