Not quite the same thing, but Nick Yarris spent 21 years on death row [1] because he was (unjustly) facing life in prison for an unrelated offense and thought he could maybe be released if he lied about knowing information about a murder. When they found out his information was wrong, they charged him with the murder and convicted him. He was exonerated based on DNA evidence.
So, yeah. If you tell the truth, you might be considered guilty, and if you lie, you might be considered guilty. The best option is to say nothing.