# Is there a function that compares two lists and take from first the element with the position of largest value at second?

Is there a function in Mathematica that compares two lists and take from first the element with the position of largest value at second:

  list1= {a,b}; list2={1,2}; out = b


If you are looking for one built-in function does this job, I think there's no such function at the moment, but your goal can be easily achieved by

list1[[Ordering[list2, -1]]]

MaximalBy[Transpose[{{a, b, c}, {1, 2, 3}}], Last]


Just realised @Corey979 mentioned the same in comments but my method would use Pick

list1={a,b,c,d,e}
list2=RandomInteger[10,5] = {0,7,7,9,1}

Pick[list1,list2,Max[list2]]
Out[54]= {d}