Getting all results using where clause
Try this
select colname from tablename where 1=1
hope the above will work
select colname from tablename
where columnname=(case when @x ="All" then columnname
else @x end)
Just leave the where condition out.
If you really want it that complicated use
where columnname LIKE '%'
which will only filter nulls.