How do I use the IF...ELSE condition in a WHERE clause?
I think the question is a little misleading &amp; causes people to not think properly. Looks like the 3 conditions won't overlap, so all you need to do is OR the 3 statements together:

create or replace package body If_Else_Pack is

  Procedure Moving(obj_A IN varchar2,
                   obj_B  IN varchar2,
                   obj_C IN varchar2,
                   obj_D    IN varchar2,
                   cur_Result     OUT T_CURSOR) is

   begin

        open cur_Result for
        select w.assetid,
                 w.vehiclenumber,
                 w.LatLong,
                 w.CurrentSpeed,
                 w.timeOfMovement,
                 w.CurrentPlace,
                 w.curTime,
                 w.motion,
                 w.fuelR,
                 w.VehicleStart
        from waypoints1 w
        where 
        (((obj_D= '0' or obj_D is null) and (obj_C= '0' oR  obj_C is null)) 
                 and w.customer_id =obj_A
                 and w.delegate_user_id = obj_B)
        or
        (((obj_D= '0 'or obj_D is null) and (obj_C&lt;&gt; '0' or obj_C is not null)) 
           and w.customer_id = obj_A 
           and w.category_id = obj_C 
           and w.delegate_user_id = obj_B)
        or
        (((obj_D&lt;&gt; '0' or obj_D is not null) and (obj_C= '0' or obj_C is null))
           and w.customer_id = obj_A
           and w.fleet_id = obj_D
           and w.delegate_user_id = obj_B);
END MOVING;
END IF_ELSE_PACK;




The WHERE condition can be further simplified to:

        WHERE 
              w.customer_id = obj_A
          AND 
              w.delegate_user_id = obj_B
          AND 
              ( (obj_D = '0' or obj_D IS NULL) AND (obj_C= '0' OR obj_C IS NULL) 
             OR 
                (obj_D = '0' or obj_D IS NULL) AND (w.category_id = obj_C) 
             OR 
                (w.fleet_id = obj_D) AND (obj_C= '0' OR obj_C IS NULL) 
              ) ;