I have a query which contains a subquery which is something like this
IFNULL((SELECT id FROM mytable WHERE id = 1), 'No')
It works OK, but I would like to return the string 'Yes' on success rather than the actual id of the row.
Is there any way to override the value it returns?
Thanks.
IFNULL((SELECT 'Yes' FROM mytable WHERE id = 1), 'No')