I’ve come across the following verbs:
erzählen, verraten, and sagen,
which all mean ‘to tell’.
What’s the difference between them?
Well, tell has a few differing meanings and depending on what you're going to express, you need to translate differently.
Erzählen is to tell a story or to tell a joke, verraten is to tell a secret, and sagen is simply to say as in die Wahrheit sagen (to tell the truth).
Actually, this is general reference and all these information are given in dictionaries. For example, consult the Pons dictionary.
For the sake of completeness, here are how to use the three translations you mentioned:
Verraten is in the sense of a secret.
Tell me your secret.
Verrate mir dein Geheimnis.
Erzählen is mostly in the sense of a story. Also, it could be used for a request to be told what happened.
Tell me the story.
Erzähl mir die Geschichte.
Tell me what happend.
Erzähl mir was passiert ist.
Sagen describes more or less the rest. It is a more neutral term.
Tell me when it's over.
Sag mir wenn es vorbei ist.
Nearly everywhere where you could use verraten or erzählen you could use sagen. The following would be valid also.
Sag mir dein Geheimnis.
Sag mir was passiert ist.
But with the story, it is not correct.
Sag mir die Geschichte. (not correct)
In the case of a story or tale it has to be erzählen.