Lying is most often seen to be good in three principal cases (a) where it averts a misdeed or crisis, particularly affecting an innocent or unrelated party; (b) when socially considerate, helpful and complete harmlessness or trivial to the point where it seems absurd to quibble about whether a lie has been told; and (c) when done as a duty to particular individuals to protect their secrets. In summary, beneficial lying is justified because it serves the public good and avoids long-range harm. However, what are thought of as "noble lies" may not in fact be justified by an immediate crisis nor by complete triviality nor by duty to any one person; but rather that the liars tend to consider them as right and unavoidable because of the altruism that motivates them. Error and self-deception can mingle with the altruistic purposes and blur them, making them some of the most tricky and dangerous of lies.
A plausible, if rather extreme, example of lying for the good is if a murderer asks you which way his intended victim has gone, and you show him in the opposite. A less clear-cut instance would be a military draftee pretending medical disability to avoid having to kill in active service.