Sram T3 cracks when pedaling, but it works, in all three gears.The bike is three years in use
A crackling sound could be a bad bearing in the hub. Does it also feel gravelly (as if you have dirt in the hub) or do you hear a grinding sound as well?

Note that a single crack when changing gears is relatively normal. If all fails, go to your local bike shop to get a real opinion (internet opinions don't count).