"Що" is specifically Ukrainian (literary!!!) variant, Russians would use "чё?" or "шо?" instead (and this would be humorous, informal variant). It is also usefyl to know "ща" (сейчас --> щас --> ща). I cannot imagine a textbook teaching foreign learners different layers of the language. Probably, you should consider it OK to use any generic informal expression in conversation, and avoid all of them in formal writing. I guess, having graduated from a faculty of physics, I have little difficulty writing a formal, scientific-looking text. Yet some people, and I mean native speakers, cannot do it reliably and sound hilarious when they try. Formal language is a sort of a slang itself: there are certain expressions and structures that you are expected to follow. Mess them up - and you sound bad.