I think it depends on how the trial plays out. Here we have a situation where a person has evidence and, for a number of reasons, doesn't want to attend court and give it. As stated above, he is compelled to attend court, under threat of warrant.
A charge of fabricating evidence would be applicable to a situation where a person didn't have evidence but gave testimony anyway in order to obtain a conviction. That's not the case here.
A charge of contradictory evidence only applies where a person gives one version of events at on trial and then a different version of events at a second trial. Here we just have 1 trial so that's not applicable.
Perjury would apply in this situation if the person attended court and "with intent to mislead" (i.e. obtain an acquittal of his friend), gave a false statement (which he knew to be false) under oath. So if he shows up and says, "He wasn't driving." when he knows he was, he's guilty of perjury. He's equally guilty of perjury if he shows up and says, "I don't remember", when, in fact, he does remember. BUT, the crown has to prove that (a) that the statement was false and (b) that the person giving it knew it was false. This is difficult to do because it all goes on in the accused's mind. Especially (b). Furthermore, s. 133 says that the evidence of 1 other person as to the perjury is NOT sufficient evidence to convict unless it's backed up by some other evidence. So the accused would have to tell 2 or more people that he lied and they'd have to give evidence against him or the Crown would have to have some other incontrovertible proof of the lie. Very difficult to do. Often for perjury, the evidence comes from the accused himself in a confession.
So, while one could show up to court and claim to not remember anything and probably get away with it (which I'm not advocating by the way), they would still be guilty of perjury. The other option is to simply refuse to answer any questions. Of course then you can be charged with contempt under s. 545 of the Criminal Code and sent to prison for up to 8 days while proceedings are adjourned for you think about it.
The bottom line is that our justice system holds that if you have information that can assist the court in determining the guilt or innocence of an accused, you have an obligation to participate in the process.