Is it okay to lie if somebody wants to know personal information you would rather not reveal, especially if saying “I don’t want to tell you” would give away the information? For example: If somebody asks you if you like a certain person and you say “I’d rather not say,” that pretty much gives you away.
Deflecting personal inquiries of any nature is an acquired skill but it does not require lying. In the hypothesis you offered, a person who does not want to admit attraction to someone he otherwise likes can say, “She’s a good friend,” and change the subject. The requirement not to lie does not require anyone to reveal personal information he is not comfortable sharing.