It is OK to tell “white lies” for good results.
– But the example that you give is not a good one. Depending on the actual situation, it could be good or bad.
Here is a better example of a good “white lie”:
“10. During the Nazi terror in Germany, many Germans “lied” to the Nazis that they were not hiding Jews in their houses; of course, the intention was to save human lives, and thus it was the right thing to do. They acquired good kamma for protecting lives.”
That is from the post, “Right Speech – How to Avoid Accumulating Kamma.” You may want to read it.