few suggestion to your problem:
First of all, set number as value in your select tag
ie.
<SELECT>
<option value="1"> first state </option>
<option value="2"> second state </option>
<option value="3"> third state </option>
</SELECT>
Now matching with first character with the try looking at String.indexOf function, you will bet
Alternative solution:
If you want to keep value as string, the way have currently declared, then you need to keep an data set that can represent this;
example:
var stateResult = new Object();
stateResult['StateOne'] = 1;
stateResult['StateTwo'] = 2;
stateResult['StateThree'] = 3;
var stateResult = {StateOne: 1, StateTwo: 2, StateThre: 3};
console.log(stateResult.StateOne);
console.log(stateResult["StateTwo"]);