i have table called my_table like this
+------------+-------+-------+
| product | type1 | type2 |
+------------+-------+-------+
| Banana | NULL | A1 |
| Grape | NULL | B1 |
| Watermelon | A | A1 |
| Orange | B | A1 |
+------------+-------+-------+
i want to select product based on his type, if type1 NULL then the type using type 2, if not then use type 1
so the expected results like this
+------------+------+
| product | type |
+------------+------+
| Banana | A1 |
| Grape | B1 |
| Watermelon | A |
| Orange | B |
+------------+------+