I am creating a mysql view with some table have joined with each other and also have to select some data without related table for report purpose that\'s why I am using case