the account types are type "bit" to indicate yes or no that the notes in the row apply to that account type.

The 2nd table is a user table and there is a field called "lastaccounttype" where it lists the last account type a user has been assigned to. SO it would have:

user lastaccounttypeericb1 account1

I am trying to wite a query that selects only the rows from the notes table where the bit flag for the note is the same account type as the "lastaccounttype". So in the example above, it would only return rows 1 and 3 where the bit flag for "account1" was set to yes (or 1).

Not sure if I need 5 case statements, or if there is another way to write this? Any help is greatly appreciated, thanks!

Prosecutor James Blackburn, in closing argument in the "Fatal Vision" murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."