I have seen this link to find a solution to my problem:
However, in my case I need to evaluate that when a parameter has a certain value, it evaluates a field when it is null or not, for example:
WHERE (CASE @parameter WHEN 1 THEN a.fieldOne IS NULL ELSE a.fieldOne IS NOT NULL END)
But this doesn't work for me...
EDIT 1
For example when @parameter = 1
SELECT * FROM
FROM exampleTable as s
WHERE (s.fieldOne IS NULL)
And when @parameter = 0
SELECT * FROM
FROM exampleTable as s
WHERE (s.fieldOne IS NOT NULL)