Why would a Mode-C transponder report a different altitude than an altimeter/GPS?
It sounds like there was an issue with your altitude encoder 


  The transponder depends on an external altitude encoder to provide the
  digitized pressure altitude that the transponder needs for its Mode C
  replies. The encoder is connected the same static air line as the
  altimeter and is wired electrically to the transponder.
  
  AR-850 The encoder may be either a separate unit ("blind encoder") or
  integrated into the aircraft altimeter ("encoding altimeter").
  Encoding altimeters save space and help ensure that the encoder and
  altimeter agree, but they are fairly expensive.


If you have a blind encoder its possible it can report erroneous information with out affecting other instruments onboard. You should alert your mechanic (or the mechanic that takes are of the aircraft in question) to have this checked.