Code:
data in the table "words"

word1    word2
gold     jewelry
jewelry  diamond
I have the table like the above.
The code below yields the result below.
Code:
code

SELECT word2 as word
FROM words
WHERE
word1='jewelry'

UNION ALL

SELECT word1 as word
FROM words
WHERE
word2='jewelry'

result

diamond
gold
So far, so good.

Here goes what I want.
I have another table named myGroup1 like the below.
Code:
data in the table "myGroup1"

group1
group1-1
group1-2
I like to yield my target result below joining the table "words" and "group1."
Code:
target result

diamond group1-1
diamond group1-2
gold group1-1
gold group1-2