You can use a compound statement:
Code:
BEGIN
IF <condition> THEN
<statement>;
ELSE
<statement>;
END IF;
END
If you only worry about insert vs. update, then have a look at the MERGE statement. That gives you the best performance because all the decisions are evaluated internally to DB2 in a more optimized fashion than a procedural approach like above could do.