I am trying to add a CASE statement, but I need an OR within it and I am having a little trouble.
I'm not sure how I can do this, but I was hoping someone could help. Here is what I am trying to do:
SELECT *
FROM Table1
WHERE IsUpdate = CASE WHEN @Type = 'Yes' THEN 1 ELSE (0 OR 1) END
So basically, I want to select only the rows that have IsUpdate set to 1 when @Type = 'Yes', otherwise I want to select the rows where IsUpdate = 0 OR IsUpdate = 1. Any ideas?