This question already has an answer here:
I have a field with building height in levels. I want to create a new field that returns 'low-rise' if buildinglevels < 4. That returns 'mid-rise' if building level is 4-9 and that returns 'high-rise' if building level > 9. I can do this for one condition
If( "buildingle" > 9, 'high-rise' ,pass)
But when trying the others, they overwrite the previous to NULL. How to solve this?