How to login by single role if user have multiple roles? In my latest project client asked me to add extra interface after login where all roles assigned to that user will be shown and user can choose the single role and login by that role only. But i don't know how to do this in drupal. I tried with role switcher and other module but they didn't  work for me ? Any suggestions will be appreciated.

Suppose
User x have roles A B C D
x can choose single role(eg A) after login and do the work only with that role.
Create a custom module
Create a custom form where Admin can whitelist users for certain roles .. Form should have  username and roles as a list or checkboxes.
Store these settings in database - uid - roles
When a user logs in redirect user to a form where he can select user roles from above list
On Form Submit, Update user programatically and assign role to the user he selected, remove other roles that user has if any