Select one of the given links + compare it

Is there a possibility of a random generator?
I have a program where one of several links should always be clicked. This should not always click the first link of the list, but a random one.

Is there also the possibility to compare the link text with another and to take another link for certain combinations?

greeze