As mentioned it depends on the elasticity of the table tennis rubber. How much of the energy is returned in the form of reversing the spin, and reversing the velocity?
With a given table tennis rubber, then the issue is the velocity (speed and direction) of the stroke, and the angle of the blade. With elastic table tennis rubber, against heavy top spin, it is possible to hold the blade still and simply angle the racket face downwards, and the ball will be returned with quite a bit of speed and top spin. The amount of speed and top spin returned will then be determined by the nature of the table tennis rubber.
Top spinning against back spin is more interesting. With enough blade speed, and striking the table tennis ball while it still has an upward component of velocity (still rising), both the blade angle and the stroke motion can be less than 20 degrees from horizontal.