Solution 1:

I find this to be a fairly common exchange in customer service (CS) situations (cashiers, waiters, telemarketers, and the like) these days:

CS: Hello, how are you doing today?

Me: Good, thanks, and you?

CS: I'm doing great, thank you for asking!

Apparently, the phrase "thank you for asking" is considered the height of customer service etiquette now.

So not only is saying, "thank you for asking" not rude, it's a form of politeness that's scripted often into customer service interactions.

Solution 2:

I'd rather place it among ironical phrases, with rudeness intended or not intended:

— Lend me a grand, dude?

— No such money on me, pal, but thanks for asking.

 

— I seem to have scratched your car a bit while trying to park… Are you okay?

— Well, not exactly, but thanks for asking.

If the person you're talking to doesn't expect any irony, I'd suggest that you choose some other similar phrase with no potential negative connotations.

As to the better way of expressing your gratitude, I think sincere 'I'm glad that you've asked me' will serve the best. Note that the brevity is your enemy here: even 'Thank you for asking' will be a fitter choice than 'Thanks for asking'.