The noob way to do this:
SELECT field1, field2 FROM table WHERE field1 = TRUE OR field2 = TRUE
You can manage this information properly at the programming language only doing an if-else.
Example in ASP/JavaScript
// Code to retrieve the ADODB.Recordset
if (rs("field1")) {
do_the_stuff_a();
}
if (rs("field2")) {
do_the_stuff_b();
}
rs.MoveNext();