Yes, it's possible. But before you try to perform the action with an "if" statement, consider whether you really need to see NULL values when you run your query.
You may be better off breaking this into two queries to avoid the overhead of having to do a conditional check on each value of SubCategoryName to see if it is NULL.
Of course, this is all dependent on how you want to lay everything out for your visitors.