How to get results in MYSQL:
If the first selection has more than 0 rows, return the result, otherwise return the result of the second selection ( is not the same table , there is only one column in the two selections).
Something similar
SELECT IF ((EXISTS(SELECT COLUMN 1 FROM TABLE 1)),(SELECT COLUMN 1 FROM TABLE 1),(SELECT COLUMN 1 FROM TABLE 2);
You can use the joint trick here: