You need to break the string conditionaly as you have your rule I can assume that the address will either have only the street name, or the entire address.
the query you need is this one:
select
id,
case when instr(address,',') >= 1
then REGEXP_SUBSTR(address, '[^,]+', 1, 1)
else null end num,
case when instr(address,',') >= 1
then REGEXP_SUBSTR(address, '[^,]+', 1, 2)
else address end street,
case when instr(address,',') >= 1
then REGEXP_SUBSTR(address, '[^,]+', 1, 3)
else null end city
from ads
This function REGEXP_SUBSTR(address, '[^,]+', 1, 1)
it is getting a substring from your column based on a regular expression [^,]+
which mean anything that is not a ,
the first 1
is the start position that the function will evaluate of the field address
and the second 1
the N occurency of the regular expression.
See it here on fiddle: http://sqlfiddle.com/#!4/dd1901/8