When my three year old voluntarily lies I consider this creative writing and I go along with the story and then encourage her to express the underlying desire. For example... "Oh, tell me about that! She hit you? You probably didn't like that did you?" She'll express that hitting is on her mind and how to express frustration is not clear.
Or, "Oh, Daddy said you could have a cookie for dinner? Is our whole dinner going to be cookies tonight? I am excited about that!! I want ice cream with mine, what about you? that sounds like a terrific dinner!" [pause] "I sure wish we could really do that and stay healthy. It would be fun wouldn't it? Do you want to know what we ARE going to have for dinner?"
If you try this approach and like it... You may want to read Touchpoints (at least the section on lying) and Playful Parenting. Touchpoints will help you put a context around lying as a NORMAL and healthy (read: Creative brain) development all children go through.
Playful parenting will help you put a context around how to have fun with his creativity rather than taking everything seriously, which may promote the bad behavior.
If they are not voluntarily lying - i mean if you are forcing a lie (when they know the "right" answer and you knwo what they just did is "wrong" and you ask any way) -- the book How to talk to kids so kids will listen and listen so kids will talk... is a great book that will help you learn not to ask questions in a manner that provokes a lie when you know what you saw. If you know, don't ask. You might be just setting him up and then chastising him for a situation to which you have contributed.
J.