For some reason, it’s a common belief that it’s impossible to lie when you are hypnotized. If that was the case, I’m sure we would see a lot of witnesses being gripped to make sure they didn’t lie in court. But it is straightforward to lie in the hypnotic state; you can decide exactly what you want to say in response to any questions the hypnotist asks you.
It is also relatively easy to make it look like you are hypnotized. So even if it weren’t possible to lie in hypnosis, it would still be possible to fake the hypnotic state and then lie. That it’s possible to lie in hypnosis makes it useless as a testimonial in court. But that doesn’t mean that law enforcement cannot use hypnosis. Since the subconscious mind holds every experience in mind, the law enforcement sometimes uses forensic hypnosis to question witnesses for number plates they may only have seen in a split second. There is no doubt that investigation is much easier if you have a suspect and a getaway car. Whether such details can be recalled by the subject dramatically depends on the situation and the skill of the forensic hypnotist.
The conclusion: You can lie as much as you want in hypnosis, but you should ask yourself why you would like to lie and if this reason is good enough. Most hypnotists promise to keep the consultation secret.