If you mean controlling which database Drupal uses for its own database tables (e.g. the table containing all the registered users, the active sessions, the nodes created), then it is not possible. There is no way to tell Drupal which database use basing on the user's roles.
If you are asking about your own module, then it is possible, but your module needs to handle this on its own because Drupal doesn't have my specific functions to handle your use case, except the following ones:
user_has_role() checks the user account passed as argument (or the currently logged-in user) has the role passed as argument
db_set_active() set the database used from the successive database API calls using one of the keys set in the settings.php file
Rather than using
db_set_active(), I would use
$options['target'] which can be used from any Drupal function necessary to query the database.