SQL retrieving different data

SQL retrieving different data

case 1 - https://analytics.zoho.eu/workspace/143206000000002008/edit/143206000021753342

when I use text in the CASE statement, it retrieves only part of the data (being 90 the max. no. of lic.)

case 2 - https://analytics.zoho.eu/workspace/143206000000002008/edit/143206000021753342

when I use the number in the CASE statement, I delete the ELSE or I used an IF clause instead, it retrieves all the data (being 587 the max. no. of lic.)

I would like to understand why case 1 is not retrieving all or giving me an Error instead, but it works for some of the data.

Thank you