Hello! (i'm new here so sorry if this is the wrong section...)

I've been searching for a script to replace text onClick of an image, however I haven't found quite what I'm looking for. When an image is clicked, I would like text to appear, however if another image is clicked, I would like some different text to appear in the same place, therefore replacing the previous text.

I hope you understand what I'm wanting.

Any help is greatly appreciated,
Thanks in advance.