I believe lies that can protect yourself

I believe lies that can protect yourself, your family, also your friends are surely viable. If a friend mentions a secret and somebody questions you, what did he say? I would personally answer, Nothing. It is simply not my secret to tell. I cannot tell other ones secret without consent. Therefore lying about knowing, is a better option than saying “I can’t tell you” which will make them want to grasp even more. Do you value not being lied to? If yes, do you still lie an occasion?
I do value not being lied to, however, when I am lied to, I understand in some occasions and respect being lied to. I will still lie on occasions that lying is a must, example, to protect my family, friends, and to those who cannot deal with the truth on some occasions.