Hi and welcome to the forum

Try this, copied down...
=INDEX($A$1:$M$14,ROW(),MATCH($R$1,$A$1:$M$1,0))