I have a statement - simplified
CASE WHEN UserName = 'xxx' THEN 1 ELSE 0 AS Deleted
WHERE Deleted = 0;
WHERE UserName <> 'xxx'
Wrap your original query up in a derived table. (Since column aliases aren't available in the same query's where clause.)
select * from ( SELECT UserID, CASE WHEN UserName = 'xxx' THEN 1 ELSE 0 END AS Deleted FROM User ) dt WHERE dt.Deleted = 0;