I want to perform a mySQL query that returns all the results in a table but has an additional column that has values "selected" if they correspond to a separate query. For example
| name |
|------|
| a |
| b |
| c |
I want to be able to return the following when I do a query "select * from table where name = 'a';
| name | selected |
|------|----------|
| a | yes |
| b | |
| c | |
That is, I also want to know which ones where left out.