One excellent example can be seen in Hamlet's account to Horatio of how he managed to escape England. Hamlet used deception in order to escape certain death in England, thereby preserving himself.
In Act 5, Scene 2, Hamlet relays to Horatio his story of escape from England. While at sea with Rosencrantz and Guildenstern heading to Enlgand, Hamlet begins to feel uneasy, as we see in his lines:
Sir [Horatio], in my heart there was a kind of fighting
That would not let me sleep. Methought I lay
Worse than the mutines in the bilboes. (4-6)
The word "mutines" can be translated as "rebels," and "bilboes" means "shackles," or chains (eNotes). In other words, Hamlet is telling Horatio that he had the foreboding sense that he was among enemies and being chained, even though he was on a ship among his friends Rosencrantz and Guildenstern. Hamlet then explains that he decided to listen to his gut instinct of uneasiness and stole out of his cabin in the night in order to find both Rosencrantz and Guildenstern and search their belongings. In their belongings he found a letter written by King Claudius commissioning the English authorities to have Hamlet beheaded upon his arrival for the protection of both England and Denmark. However, Hamlet very cleverly rescues himself. He explains that he wrote a second letter ordering the deaths of both Rosencrantz and Guildenstern instead. He replaced the original letter with his new letter and used his father's own signet ring to officially seal it. His father's seal was similar enough to King Claudius's, so no one noticed any difference. Hence, Hamlet very cleverly used deceit to rescue himself from death in England and to return to Denmark to follow through on avenging his father.