Hello Naresh,
did you define all columns in the output area of the scripted view? And did you check if the columns match the columns you query?
By the way, why are you using a scripted calc. view and not a graphical one? The logic you are describing with the statement could also be modeled.
Regards,
Florian