I\'m building query to search multiple rows from database like
SELECT * FROM table1 WHERE col1 = \'012311\' OR col1 = \'0123631\' OR col1 = \'0
There are several approaches, which depend on the dataset. Here's one way:
SELECT *, IFNULL( ( SELECT col1 FROM table1 WHERE col1 IN ('012311','0123631','091233','092111') ), 'some_value' ) AS my_col1 FROM table1;
Not neccessarily copy+paste, you will have to adjust for your specific case.