You could make an array with the y positions in it
var hair_positions = [15, 20, ...]
then if hairnum changes get the position
sprite.position.y = hair_positions[hairnum]
Note that hairnum has to be 0 to get the first position in the array, 1 for the second and so on. Or subtract 1 like
sprite.position.y = hair_positions[hairnum-1]