Two voltage sources - selecting with digital signal
If you want either 


Output from buck converter 


or


12V


applied to the fan then you can use diodes from both sources and enable one at a time.
This is not ideal as you have a diode drop in each case but should work well enough n most cases.  

Use Schottky diodes for minimum voltage drop.

Once we understand the requirement better we can show you how to use transistors to do the switching.