WHERE TABLE1.ID IS NOT NULL
AND CASE WHEN TABLE1.ID = 0 THEN TABLE1.ACTIVE = 1 END
Don't forget that CASE is an expression and you can't initialise cols/vars
in the THEN or ELSE clause, you would need to write...
AND TABLE1.ACTIVE = CASE WHEN TABLE1.ID = 0 THEN 1
SQL Server MVP
(Create your own groups, Forum, FAQ's and a ton more)