I want to only use the where condition if Make is not equal to '0'. This is what I have tried. This is a snippet from the stored proc. Query works only when Make is not 0. When it is '0' it fails.
This is not a null check. @Make is a varchar. How it is implemented is either it will be '0' or it will be a string e.g 'mazda'.
select *
from In_Inventory
where
and Make = case
when @Make != '0'
Then @Make
end