If any module doesn't fit yoour requirement then you can use the below code
You can create any custom module or put this code in template.php of your theme.
function testing_custom_form_alter(&$form, $form_state, $form_id){
if($form_id=="user_register_form"){
$result = db_select('role', 'r')
->fields('r',array('rid','name'))
->condition('name',array('administrator','anonymous user'),'NOT IN')
->execute()
->fetchAll();
$role = array();
foreach($result as $userRole){
$role[$userRole->rid] = $userRole->name;
}
$form['role']['#type'] = "select";
$form['role']['#options'] =$role;
$form['role']['#required'] = 1;
$form['role']['#size']='auto';
$form['#submit'][] = 'custom_assign_role';
}
}
function custom_assign_role(&$form, $form_state){
$uid= $form_state['values']['uid'];
user_multiple_role_edit(array($uid), 'add_role', $form_state['values']['role']);
}
Hope it will help!