I've done it.
A couple of years ago I lived in a flat (I owned) with a neighbour upstairs (she rented) when her ex boyfriend (who I knew) broke in very early one Sunday morning. I was woken by her screams. She reported the incident to the police who came to me for a statement. I hated the woman with a passion as she had made my life a misery for quite some months but I felt that what he had done was totally unacceptable so I supported her and told the truth to the policeman.
A couple of days later another in a long line of incidents between me and her resulted in her writing me an extremely disturbing letter to me where she made several untrue accusations against me such as that I was a drug addict. Seeing as I knew she was a cokehead I took massive offence at this. So I contacted the police officer and withdrew my statement. The courts wrote to me to tell me the exboyfriend was charged and convicted. I never knew if my evidence was used in court though, although I hope not.