I want to have PL/SQL in Oracle for below statement I have 2 tables in oracle DB
<table>
<tr>
<th>Value1</th>
<th>value2</th>
<th>Value3</th>
</tr>
<tr>
<td>xxx</td>
<td>ppp</td>
<td>hello</td>
</tr>
<tr>
<td>yyy</td>
<td>qqq</td>
<td>hello1</td>
</tr></table>
table2
<tr>
<th>Id</th>
<th>Msg</th>
</tr>
<tr>
<td>1</td>
<td> {
"messages": [
{
"source": "abc",
"messageType": "pqr"
},
{
"source": "abc",
"messageType": "pqr"
}
],
"value1": "xxx",
"value2": "ppp"
}
</td>
</tr>
I should get value "hello" or "hello1" based on value1 or value2 from table2