Hmm... Maybe someone else knows how but as far as I know you can't do that - at least not that way.
Perhaps you could store the materials as variables before you use them in the random set, name the variable the number you want and then getting the material would return their name as the numerical position.