stat.execute("insert into testNvl2(id, txt1, txt2, num) values(5, '2', null, 1)");
stat.execute("insert into testNvl2(id, txt1, txt2, num) values(6, '2', null, null)");
stat.execute("insert into testNvl2(id, txt1, txt2, num) values(7, 'test2', null, null)");
String query = "SELECT NVL2(txt1, txt1, txt2), txt1 FROM testNvl2 order by id asc";
ResultSet rs = stat.executeQuery(query);
rs.next();
String actual = rs.getString(1);
assertEquals("test1", actual);
rs.next();
actual = rs.getString(1);