The question does not provide adequate information to provide an
exact routine and as Willie Wong commented, it maybe trying to solve the
problem with the wrong datastructure.
One approach is to place the booleans in a variable consisting
of zeroes and ones. If anyone of the booleans is true then it will then
be a number that is greater than zero.
One limitation of the macro above is that if the first boolean is 1 then the string can
only be ten digits long, otherwise the number will be too big. Depending on the number of booleans
one could extend the macro and split it into two to avoid this limitation and parse the two arguments.
What one does with it afterwards, it depends. One can actually use the first
boolean that is true to trigger another action. In such a case we would
have re-discovered the switch datastructure which is catered by
ifcase in TeX!