Hi, my code is like this
if column3 = 1
BEGIN
SELECT columm1,
column2,
column3
FROM table1
WHERE column1 = column2
END
ELSE
SELECT columm1,
column2,
column3
FROM table1
END
As you notice, the only difference is the where statement
My actual code contains 10 repetitions of this depending on the category the user chose that is why i want to shorten this.
My Question is: is there a way to shorten this?