Assuming its chemical corrosion eg alloy hub-steel sprocket combo reaction, try soaking thread in vinegar for 24hrs at least, you will need to regrease hub bearings afterwards, then if you access to vice clamp/ grip sprocket in vice and use wheel as turning force! If that doesn't work strip hub and use blowtorch to heat sprocket then proceed as above! After that new wheel and or wheel rebuild with new hub etc!
Fit new sprocket use above Copper Based Grease to reduce chance of it happening again.
Lastly GOOD LUCK!