Check this page in order to do the query to your DB. Your query should be something like the following example:
SELECT *
FROM YOUR_DB_NAME
WHERE NIK=?
If you prefer to reduce the volume of data returned from the DB you may choose select only the TTL column.
After this, split the value of TTL column using split method
String str = "bulan,10-11-2017";
String[] parts = str.split(",");
Split method will return an array containing different parts of the original String that were split based on the delimiter that was passed into split() method.
Example
For example you queried the database and the resultset contains the data returned from the database.
You then need to get the value of the TTL column from the resultset and save it some String type variable
String str = rs.getString("TTL");
Now use split method on this str variable
str = "bulan,10-11-2017";
String[] parts = str.split(",");
For help with how to query the database, see the link provided above