How to create relationship dynamically

I have the following data.
|id | first_comment | second_comment | third_comment|..|n_comment|
|--- | --- | --- | ---|..|---|
| 111|some_comment |some_comment |null |..|null|
|112 |some_comment |some_comment |some_comment |..|null|
|113 |some_comment |some_comment |some_comment |..|some_comment|

the data is in csv format. I want to create a "NEXT" relationship among the comments for each id. Below is the data modelling

for some ids there could be 100 comments populated whereas for some ids there could be just 2 comments. Hence the creation of the relationship has to be dynamic.

I was able to develop the nodes but couldn't figure out to create relationship

load csv with headers from 'filename.csv' as row
merge(f:complaint {id:row.ID})
with row , keys(row) as columns
unwind columns as commentColumn with distinct commentColumn where commentColumn ends with '_comment'
load csv with headers from 'filename.csv' as row
create (c:test_comments {id:row.ID, order: commentColumn, text:row[commentColumn]})

can anyone please suggest how to create dynamic relationship here ?

@falcon14497

What version of Neo4j? Neo4j 5.26 introduces dynamic labels and relationship. See CREATE - Cypher Manual and https://neo4j.com/docs/cypher-manual/current/clauses/load-csv/#dynamic-columns

but also and maybe it depends on your model and then the resultant queries to be submitted against. I have built out similar but rather than for example having a 100 relationship path, representing 99 comments post the initial I simply attached all 100 comments to a master node and then each comment or relationship had a property named 'dateCreated' or similar. then to build out the chronological order i ran similar to

match (n:MasterNode (id:!1})-[:ALL_COMMENTS]->(n2:Comment)
return n2 
order by n2.dateCreated