>I see, you suggest to simply write N commands for each type. Since my final result is an integer count, I guess I can declare it and write as many commands as I have types - it may be a simple solution here.
If you are returning the same content but based on two WHERE clauses, than I would suggest the example I provided. If you wish to return various content, then I would suggest IF ELSE.