I want to know which table the value comes from in inner join
Pattern

SELECT COALESCE(table1.value, table2.value, ...) AS value,
       CASE WHEN table1.value IS NOT NULL 
            THEN 'table1'
            WHEN table2.value IS NOT NULL 
            THEN 'table2'
            ...
            ELSE 'None' 
       END AS source
FROM maintable
LEFT JOIN table1 ON maintable.field=table1.field
LEFT JOIN table2 ON maintable.field=table2.field
...