There are two ways of giving statement in the court:
1) The verbal but recorded in writing by the court clerk and attested by the judge/magistrate.
2) By submitting a sworn affidavit as mentioned by you.
If you retract the statement at a later date you are free to do so and would not invite any perjury charges but if you stand by your statement and is found to be false on scrutiny then you are in trouble.
Dear Pratik: I am sorry to say that I have commented as such with practical experience of my son who was convicted despite retraction of entire statement in the court by PW, leave aside the notarised affidavit and I am no expert.Only I know that , If the judge is hell bent to convict and punish you, he can because he is immune to any irresponsive behavior,attitude,action.deeds or whatever you name it and only recourse left is to go for appeal in the higher courts.