Ruby code Help

How do I add a Ruby filter in my logstash conf file.
fieldvalue1 fieldvalue2 field valu3
ASD1 Dummy1 DummyValue1
ASD2 Dummy2 DummyValue2
ASD1 Dummy3 DummyValue3
this is how it looks my index data from database,
now i want to add filter in conf file in such a way that, for ASD1, the particular value should pop up, like for ASD1, Dummy1 and Dummy2 and their values should come up. How do i do it