SQL conditional SELECT
Sounds like they want the ability to return only allowed fields, which means the number of fields returned also has to be dynamic. This will work with 2 variables. Anything more than that will be getting confusing. Dynamic SQL will help with multiples. This examples is assuming atleast 1 column is true.