It is more than a simple Case or Select (since then you will have to loop according to the values of the first element)
1. Transpose a (Thread also works) so you get a list of pairs, one from the first list and one form the second list
2. GroupBy to group these pairs according to their first element
3. Use Map at level 2 to remove the first element
4 Map the function Mean on the result so you get your results