There are several second order effects to watch out for.
One is that the loop gain changes when you change the output. This may lead to stability problems and transient problems when the load current suddenly changes.
The other thing is the efficiency and ripple filtering may change with different outputs.
In the book "Swith Mode Power Supply Handbook" by Keith Billings there is a design for such a variable supply. Book is available in MCU file manager for download - or used to be.