dynamically show image stored as static resource based on field value

dynamically show image stored as static resource based on field value.  I thought I saw this snippet somewhere but can't find it.  If anyone knows please provide the link.


if field value = x then show image.1

if field value = y then show image.2

etc