It's difficult to choose when you're torn between an option that people will say is better in general i.e. St Andrew's and an option which you, for personal reasons are leaning towards.
It's natural to want to go to the 'best' university as this is something which has probably motivated you to work hard for your grades and has been drilled into you since you were a child:
"You must do your homework to get good grades to get into a good university to get a good education to get a good job and as a result a good life"
Familiar anyone?
I would ask myself two questions if I were you:
1. Is there a significant difference in the quality of education or future employment prospects between the two universities?
and
2. If there was no such thing as league tables and prestige, which university would you choose?
If the answer to the question 1 is yes, then I would personally go to that one. University for me is about being educated and wherever you go, you will surely make the best of it and have a lot of friends and a blast either way.
If however, you can't say that there is a difference between the two then go for the answer to question 2.