Are you sure that is a good idea? I obviously don't know the details of your particular situation however, I would be concerned if a student could login as a Moodle administrator just by selecting the option in a dropdown menu.
Also, because roles are assigned to the user, once you log-in as an admin using your system, you would always be an admin, even if you chose to login as a trainer the next time. Then you would be a trainer and an Admin.
If you need this for testing purposes to see what things would be like with different roles, why not just create 5 user accounts for yourself as they do on https://school.moodledemo.net/login?
As you can see, they even publish the usernames and passwords for each of the different roles.
Just a reminder: You can always use the Switch Role To... option in the dropdown user menu. It's not as accurate as having separate accounts but it will save you from having to develop a new login page.
Speaking of which, there is an option to specify a URL
for a custom login page in Moodle. There are two ways to do this:
1) Add the following to your Moodle's site config.php file: $CFG->alternateloginurl = 'your login link';
2) Go to Site Administration > Plugins > Authentication > Manage Authentication. Then specify the alternative URL
in the Altenative Login URL field.
If you still really want to do this, you can pretty much create your own custom login page by completing that setting. Just be sure to fully test your new login page before you specify the URL otherwise you may end up unable to login to your own website.
Hope you find this useful.