How to change Game Object in code

How would I go about this problem. Lets say I have 2d objects a square and a circle. I want to code a random number function to choose which object will be put up on screen. So it will choose square or circle. So what do I do in code to make it change between circle and square. For example Lets say i’m making a flappy bird style game and I want the color or style of the pipes to change randomly while still scrolling through the view.

You could just create both objects and enable and disable them depending on which one your random function chooses.

For randomness:

Random.value