Hi,
There too many ways to achieve your goal. One of them would be to use UNION
SELECT blah, blah
FROM MyTable
WHERE (your criteria for anonymous) AND (@parameter = 'anonymous' OR @parameter = 'all')
UNION
SELECT blah, blah
FROM MyTable
WHERE (your criteria for named user) AND (@parameter = 'named' OR @parameter = 'all')
Remember to mark as an answer if this post has helped you.