I have a query that based on various ids within a table should return different results.. So for example:
Table 'orders'
- product_id
- item_id
- extra_id
- something_id
I'd like return a result based on the values of these, such as
IF item_id != 0 'ITEM' ELESEIF product_id != 0 'PRODUCT', etc.
Does anyone know how to do this?
Thanks!