I did it by splitting the column into two columns
SET @xml= '<aaa><result>
<id>1</id>
</result>
<result>
<id>2</id>
</result>
</aaa>';
SELECT
SUBSTRING_INDEX(ExtractValue(@xml, '//id'), ' ', 1) AS `id1`,
SUBSTRING_INDEX(ExtractValue(@xml, '//id'), ' ', -1) AS `id2`
OUTPUT
id1 | id2
1 | 2
As you said results node can be multiple, for this I have tried below query
SET @xml= '<aaa><result>
<id>1</id>
</result>
<result>
<id>2</id>
</result>
<result>
<id>3</id>
</result>
<result>
<id>4</id>
</result>
<result>
<id>5</id>
</result>
<result>
<id>7</id>
</result>
<result>
<id>6</id>
</result>
<result>
<id>8</id>
</result>
<result>
<id>9</id>
</result>
<result>
<id>10</id>
</result>
<result>
<id>11</id>
</result>
</aaa>';
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(ExtractValue(@xml, '//id'), ' ', n.n), ' ', -1) value
FROM (select SUBSTRING_INDEX(ExtractValue(@xml, '//id'), ' ', 1)) t CROSS JOIN
(
SELECT a.N + b.N * 10 + 1 n
FROM
(SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) a
,(SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) b
ORDER BY n
) n
WHERE n.n <= 1 + (LENGTH(ExtractValue(@xml, '//id')) - LENGTH(REPLACE(ExtractValue(@xml, '//id'), ' ', '')))
OUTPUT
Value
1
2
3
4
5
7
6
8
9
11