Randomly generated object along y axis. Any help is much appreciated.

Random generation along y axis.

float yAxis;
GameObject currentObj;

void randomInst()

{

int randomNO = randome.range(0,4);

switch(randomNo):

case 0:

yAxis =2f;

break;

case 1:

yAxis =3f;

break;

case 2:

yAxis =5f;

break;

case 3:

yAxis =5f;

break;

case 4:

yAxis =1f;

break;

if(currentObj == null){

currentObj = this.gameObject;

}

currentObj.transform.position.y += yAxis;

GameObject instObj = instantiate(prefab,currentObj.transform.position,transform.rotation);

currentObj = instObj;