Since I am not a master mindreader I am going to "assume" that you mean switch yes to 1 and so forth from a submitted form field. I will use a generic name $form as the form field. If my above assumption is correct then I believe your best logic would be to use "switch". Below I will write a generic switch script.
switch ($form) {
case "yes":
$form = 1;
break;
case "no":
$form = 0;
break;
case "n/a":
$form = "n/a";
break;
default:
print("Error: $form was not submitted");
break;
} //end switch ($form);
When using switch you create a case for each possible solution, or atleast those solutions which you want seperated or different. We call these solutions cases, what this switch does is; If $form was submitted it checks the $form value, if value of $form = yes, then we switch $form from yes to 1, we do this for case no and n/a respectively. Also note that N/A is not numeric and therefore we place quotes around it. The default can be used for many different things, commonly in a yes/no question it can be used as a error checking, IE: if $form value does not match any of the cases then it is safe to say $form was not submitted properly. You may also use the default setting if you have more than one case that deserves the same solution.
I hope this answers your question. IF this does not answer your question perhaps you could enlighten me with some more information and upon which I will revise my answer to fit your edited question.
Thank you,
Tony Devlin