I'm trying to use Not In with a boolean variable in the where to determine whether or not to search in a set for something. For example:
Select
BLAH
FROM
BLAH
WHERE
...
AND CASE WHEN @variable = 'false' THEN
warningcode1 NOT IN (101,102,103)