If I understand correctly, consider using the 'Match()' JSL expression. I generated the code below by using 'Cols > Recode':
 

and inspecting the JSL for the resulting formula column. And, 'yes', JSL is very different from VBA. You should look at 'Help > Books > Scripting Guide' and/or consider some training.
 
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Wait(3);
dt << New Column( "Age 2",
					Character,
					"Ordinal",
					Formula(
						Match( :age,
							12, "Twelve",
							13, "Thirteen",
							14, "Fourteen",
							15, "Fifteen",
							16, "Sixteen",
							17, "Seventeen",
							Format( :age, "Fixed Dec", 5, 0 )
						)
					)
				);