Je suis presque sûr que les autres réponses laissent de côté un cas :
WHERE
(Table.Field = stuff)
AND
(Table.Field2 = otherstuff)
AND
(Table2.Field3 = someotherstuff)
AND
(
(@param1 = 0 and Table.Field IS NULL)
OR
(@param1 = 1 and NOT Table.Field2 IS NULL)
OR
(@param1 <> 0 AND @param1 <> 1) -- isn't this needed?
)