SQL does not work properly on arrays

The following does not return expected result.

PUT index1/_doc/1
{
“name”:[“d1”,“d2”]
}

select * from index1 where name=“d2”

The result would be

name
d1

But “select distinct name from index1” produces

name
d1
d2

Both queries should return the same result but we get different results.