Telling a lie according to situation is not wrong according to Buddha Dhamma -- Ven. Mirisse Gunasiri Thera
According to Buddhist scriptures, telling a lie is a sin. But in practical life there are countless instances where Buddhists are called upon to indulge in lying. It's unspecific whether any sin would occur from it. An opinion expressed by the Late Ven. Mirisse Gunasiri Thera in this connection appears
below."Lieing has a dual interpretation as a minor mistake and a great mistake. If the harm or evil brought about by trying to cover up something is great and the meaning or benefit is less ... one should refrain from under all circumstances in uttering such lies. If something is covered up and the repercussion resulting is less ... such lies are considered minor mistakes. If a person's life is saved as a consequence of the lie uttered by the other party; it appears that in such an instance there is an apology for that lie.
Long, long time ago when Prince Saddhatissa crept inside the Maha Vihara in order to save his life, Prince Gemunu asked whether Saddhatissa came there and if those who were present there had replied in the affirmative ... it would have ended in a terrible consequence. Because of that lie an innocent life escaped death. It is stated in history about the national and religious decline which occured as a result of telling the truth to Rajasingha who asked for a solution from the Maha Sangha for having killed his father. If at all a clever reply which suited the occasion was given just as much as the bhikkus of Maha Vihara did ... that massive destruction would have been averted. Therefore, employing an act of falsehood in a decisive instance such as rescuing a life could not be considered as that bad".