How can i branch based on a columns value in oracle?
As per the comment, perhaps something like this:

CREATE OR REPLACE PROCEDURE MYDB.GET_DEAL_LIST 
  ( PersonID NUMBER,
    TableName NVARCHAR2,
    BuyerOrSeller INTEGER,
    a_CURSOR OUT sys_refcursor
  )
AS
  v_stmt_str      VARCHAR2(200);
BEGIN
  if BuyerOrSeller = 1 then
    v_stmt_str := 'SELECT TBLDEALS.*,t.* FROM TBLDEALS inner JOIN ' || tablename || ' t on t.ID = TBLDEALS.id and TBLDEALS.Buyer_ID = :PersonID)';
  else
    v_stmt_str := 'SELECT TBLDEALS.*,t.* FROM TBLDEALS inner JOIN ' || tablename || ' t on t.ID = TBLDEALS.id and TBLDEALS.Seller_ID = :PersonID)';
  end if;
  OPEN a_CURSOR FOR v_stmt_str using PersonID;
END;
/