If you find yourself as far down the marine food-chain as a tender little cephalopod you probably have to resign yourself to the fact that your days will end when you become lunch to a bigger fish – unless you get creative.
The mimic octopus (Thaumoctopus mimicus) uses its unique ability to mimic other sea creatures to escape being eaten. Thus far, marine biologists have identified 15 different species including venomous sole, lion fish, sea snakes, sea anemones, and jellyfish. The species that it impersonates depends on the predators that are around at the time.
From Wikipedia:
Based on observation, the mimic octopus may decide which animal to impersonate depending on local predators. For example, when the octopus was being attacked by damselfish, it was observed that the octopus appeared as a banded sea snake, a damselfish predator. The octopus impersonates the snake by turning black and yellow, burying six of its arms, and waving its other two arms in opposite directions.
From Mark Norman of the Melbourne Museum in Australia:
Having studied many octopus species in the wild, I am never surprised by the color and shape change capacities of these animals. However, this animal stood out as it was the only one we’ve encountered that goes beyond camouflage to take on the guise of dangerous animals.