Join with sqlite on table in android
You can use coalesce, it's a function that returns its leftmost non-null argument:

select coalesce(object, subject) 
from t;


Coalesce is a shorter form of:

select case when object is not null then object else subject end
from t;