Want to route incoming calls by a value in DB

Here’s what my boss would like to be able to do with Asterisk. We have a DB with our customer list. Some customers are flagged as “non-support.” He would like to have some way, so that when a customer calls in, the system gets their caller ID, looks that up against the DB, and if the “non-support” flag is set, route the call to our Accounting dept. All other calls would then go to the main IVR menu.

I see it is possible to have the system look up caller information based on CID, and route calls by that. Is it possible to do what we are looking for?