SyntaxFix
Write A Post
Hire A Developer
Questions
You can also do like this
select * from table where columnName like '%' + case when @varColumn is null then '' else @varColumn end + ' %'