Is there any way to have a coded string such that it can be decoded in multiple ways?
Maybe this example is only remotely related to the question, but anyway:

VeraCrypt application for encrypting computer's disks has an ability to offer part of the disk capacity to reach the plausible deniability with the help of 2 different passwords:


the first one unlocks so called outer volume with a non-important content,
the second one unlocks inner, hidden volume with the important content.


So both passwords are used in the same manner (in a command or a dialog box) and only by choosing between them decides which content will be accessible.