It depends on both the shape and direction of the load.
A rectangular tube is stiffer when the direction of the load is parallel to the larger dimension. Think about a 2" by 8" floor joist, they are installed with the 8" dimension vertical.
A square tube is the same in both orientations of course.
A round tube has the same stiffness in all orientations and is often the best choice for a structure where the load can come from any direction.
Angles are nowhere near as stiff as tubes with the same cross-sectional area of metal and similar dimensions.
I beams are similar to rectangular tubes being stiffest when upright.