Do you really think you're the first person to think of this?
If you actually need a certain medication, and you absolutely must take it by putting it in your lunch, then I suppose you can feel free to explain that in a courtroom, but you should be reminded that perjury is a vey bad legal strategy and judges don't like to play games.