Hi,
Create a PreparedStatement with Session#prepare or Session#prepareAsync (see the javadocs for the difference):
PreparedStatement pst = session.prepare(" SELECT " + ColumnName.SubscriberInfo.data + " FROM pcrf." + tableName + " WHERE " + ColumnName.SubscriberInfo.imsi + " = :imsi");
The string you pass to prepare contains placeholders for the values that vary. You can use positional placeholders (with "?") or named placeholders (prefixed with ":"). Here I've defined a single named placeholder called "imsi".
You only need to prepare once. Then you keep a reference to the PreparedStatement, it's thread-safe so you can share it throughout your application.
When you want to execute a query, use bind() to create a BoundStatement:
BoundStatement bs = pst.bind();
Then set the value of the parameters. I don't know the type of your imsi column, but assuming it's a string:
bs.setString("imsi", "foobar");
There are name-based setters (as shown above), and index-based setters (setString(0, "foobar")).
Finally, execute the query:
session.execute(bs);
As a shortcut, you can pass the full list of parameters to the bind method:
session.execute(pst.bind("foobar"));