You Would be Almost Unkillable
First, you'd have to fail the Wisdom saving throw, which RAW you can't just choose to do. If you manage to fail the save, barring the spell being dispelled. You are almost unkillable from anything that tries to pass through the cage.
The target shrinks to a height of 1 inch and is imprisoned inside a gemstone or similar object. Light can pass through the gemstone normally (allowing the target to see out and other creatures to see in), but nothing else can pass through, even by means of teleportation or planar travel. The gemstone can’t be cut or broken while the spell remains in effect.
Sacred Flame From Inside
Jeremy Crawford ruled that Sacred Flame doesn't require a clear path to the target on Dragon Talk from 1/19/17 at 36:20. Not because of the line of sight, but because it states in the spell that it ignores cover. So, by an official ruling, you could be Sacred Flamed from inside the gemstone.
Even with the ruling, I'm not convinced many DMs would allow sacred flame to be cast through the gemstone. The specifics of the spell imply an intent that magic of any kind can't pass through the prison. So, I'm not sure if it would still rain fire from heaven.
Loophole Works Both Ways
If your DM does allow you to sacred flame from inside, then they should allow the spell both ways. Moreover, any spell that allows you to ignore cover would also be allowed to pass into the gemstone using the same loophole you're attempting to use. Moreover, a DM might rule that you are restrained by the spell, which would mean:
- A restrained creature’s speed becomes 0, and it can’t benefit from any bonus to its speed.
- Attack rolls against the creature have advantage, and the creature’s Attack rolls have disadvantage.
- The creature has disadvantage on Dexterity saving throws.
Which would also mean you'd be unable to dodge very well.
I think the RAW might allow you to levitate the Gem, but I'm not sure most DM would let make the Gem levitate, either.
The plan comes with one quick easy foil:
- throw a blanket over the gem, no more sacred flame
A creature you can see
- simply bat the floating gem... which would then begin floating away
and not cause any problems. Levitate isn't flight, you'd be hit out of the fight like a baseball, with no means to stop or turn around.
The target can move only by pushing or pulling against a fixed object or surface within reach (such as a wall or a ceiling)
No risk of death, but you're out of the fight until you get dispelled.