Let's assume following scenario:
There's a ciphered message. Two decipher keys (let's name them A and B) are known.
Message deciphered with key A gives valid result - normal text but with no secret information. Let it be a poem or other meaningless content.
The same message deciphered with key B gives the right output, the real secret message revealed.
Please tell me, is it possible (or well-known and existing method/algorithm), or just a work of fiction? I've read about it in some novel a long time ago and tried to figure it out on my own, but with no result. But I'm rather ignorant in terms of cryptography so I might just miss something obvious.
Thank you in advance for any help - just a simple name of ciphering method or link to Wikipedia or something will be enough. I don't even dare to ask for the full and detailed explanation.