How to use the Rules module for assigning a role during user registration based on a select field option? I need to assign a role to user based on select field at the time of registration.

I have added a field in user registration form (ex: school checkbox) . When user click on school I need to assign a school role to user . otherwise default user role assign by drupal. For this I tried to create role but its not working.

{ "rules_user_reg" : {
    "LABEL" : "user reg",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "user_insert" : [] },
    "IF" : [
      { "entity_has_field" : { "entity" : [ "account" ], "field" : "field_selector" } }
    ],
    "DO" : [
      { "data_set" : { "data" : [ "account:roles" ], "value" : { "value" : { "6" : "6" } } } }
    ]
  }
}
You need to add a Rules Condition (after the one you already have) to check the value of field_selector.

With that your Rules Action should work. Though you also may want to add the Conditional Rules module to implement the "otherwise" part of your question.